STEP 7: Let's generate the random number for our second dice!

Our variables each need different names. Remember, the variable name is to the word before the equals sign =.

  • In LOGIC, go to and drag in another Random Integer. Drop it at the bottom of your program.
  • Name this new variable roll_2.
  • Change the range of roll_2 so that the random number will be between 1 and 6.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)